/* ----------------------------------------------------------------------
*
* Copyright (C) 2025 XiaoFei. All rights reserved.
*
* $file:		XiaoFei_Uart4.h
* $Date:        13-January-2025
* $Revision: 	V1
* $Project: 	XiaoFei BSP Library
*
* -------------------------------------------------------------------- */

#ifndef __XiaoFei_Uart4_H
#define __XiaoFei_Uart4_H

#define Uart4_AddRx
#define Uart4_GPIO_TX			        GPIOA
#define Uart4_Pin_TX		            GPIO_Pin_0
#define Uart4_BaudRate		            9600

#ifdef Uart4_AddRx
    #define Uart4_GPIO_RX			    GPIOA
	#define Uart4_Pin_RX				GPIO_Pin_1
	#define Uart4_Group				    NVIC_PriorityGroup_2
	#define Uart4_ITPre				    1
	#define Uart4_ITSub				    1
#endif

/* 
* @function: 	Uart4_Init
*/
void Uart4_Init(void);

/* 
* @function: 	Uart4_SendByte
* @parameter:	[in] Byte					 The byte will be send.
*/
void Uart4_SendByte(unsigned char Byte);

/* 
* @function: 	Uart4_Printf
* @parameter:	[in] format					 The parameter will be send in Uart4_Printf.
*/
void Uart4_Printf(char *format, ...);

#ifdef Uart4_AddRx
/* 
* @function: 	UART4_IRQHandler
* @callback:	The function will be callback when the Uart4 receive the data.
*/
void UART4_IRQHandler(void);
#endif

#endif


